3.1042 \(\int \frac{(a+b x)^2}{a c-b c x} \, dx\)

Optimal. Leaf size=43 \[ -\frac{4 a^2 \log (a-b x)}{b c}-\frac{(a+b x)^2}{2 b c}-\frac{2 a x}{c} \]

[Out]

(-2*a*x)/c - (a + b*x)^2/(2*b*c) - (4*a^2*Log[a - b*x])/(b*c)

_______________________________________________________________________________________

Rubi [A]  time = 0.0397019, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053 \[ -\frac{4 a^2 \log (a-b x)}{b c}-\frac{(a+b x)^2}{2 b c}-\frac{2 a x}{c} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x)^2/(a*c - b*c*x),x]

[Out]

(-2*a*x)/c - (a + b*x)^2/(2*b*c) - (4*a^2*Log[a - b*x])/(b*c)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 9.55382, size = 34, normalized size = 0.79 \[ - \frac{4 a^{2} \log{\left (a - b x \right )}}{b c} - \frac{2 a x}{c} - \frac{\left (a + b x\right )^{2}}{2 b c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)**2/(-b*c*x+a*c),x)

[Out]

-4*a**2*log(a - b*x)/(b*c) - 2*a*x/c - (a + b*x)**2/(2*b*c)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0108964, size = 37, normalized size = 0.86 \[ -\frac{4 a^2 \log (a-b x)}{b c}-\frac{3 a x}{c}-\frac{b x^2}{2 c} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x)^2/(a*c - b*c*x),x]

[Out]

(-3*a*x)/c - (b*x^2)/(2*c) - (4*a^2*Log[a - b*x])/(b*c)

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 37, normalized size = 0.9 \[ -{\frac{b{x}^{2}}{2\,c}}-3\,{\frac{ax}{c}}-4\,{\frac{{a}^{2}\ln \left ( bx-a \right ) }{bc}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)^2/(-b*c*x+a*c),x)

[Out]

-1/2/c*b*x^2-3*a*x/c-4/c*a^2/b*ln(b*x-a)

_______________________________________________________________________________________

Maxima [A]  time = 1.33979, size = 47, normalized size = 1.09 \[ -\frac{4 \, a^{2} \log \left (b x - a\right )}{b c} - \frac{b x^{2} + 6 \, a x}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(b*x + a)^2/(b*c*x - a*c),x, algorithm="maxima")

[Out]

-4*a^2*log(b*x - a)/(b*c) - 1/2*(b*x^2 + 6*a*x)/c

_______________________________________________________________________________________

Fricas [A]  time = 0.215882, size = 46, normalized size = 1.07 \[ -\frac{b^{2} x^{2} + 6 \, a b x + 8 \, a^{2} \log \left (b x - a\right )}{2 \, b c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(b*x + a)^2/(b*c*x - a*c),x, algorithm="fricas")

[Out]

-1/2*(b^2*x^2 + 6*a*b*x + 8*a^2*log(b*x - a))/(b*c)

_______________________________________________________________________________________

Sympy [A]  time = 1.21252, size = 31, normalized size = 0.72 \[ - \frac{4 a^{2} \log{\left (- a + b x \right )}}{b c} - \frac{3 a x}{c} - \frac{b x^{2}}{2 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)**2/(-b*c*x+a*c),x)

[Out]

-4*a**2*log(-a + b*x)/(b*c) - 3*a*x/c - b*x**2/(2*c)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.203873, size = 62, normalized size = 1.44 \[ -\frac{4 \, a^{2}{\rm ln}\left ({\left | b x - a \right |}\right )}{b c} - \frac{b^{3} c x^{2} + 6 \, a b^{2} c x}{2 \, b^{2} c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(-(b*x + a)^2/(b*c*x - a*c),x, algorithm="giac")

[Out]

-4*a^2*ln(abs(b*x - a))/(b*c) - 1/2*(b^3*c*x^2 + 6*a*b^2*c*x)/(b^2*c^2)